#include "edge.hpp"
#include "edges.hpp"

namespace hms
{



Edge::Edge( const Edges& edges, Index index ) :
	m_edges { edges },
	m_index { index }
{}

auto Edge::edges          () const -> const Edges& {
	return m_edges;
}

auto Edge::meshImp        () const -> const Mesh& {
	return m_edges.mesh();
}
auto Edge::indexImp       () const -> Index {
	return m_index;
}
auto Edge::lengthImp      () const -> scalar {
	return m_edges.length(m_index);
}
auto Edge::verticesImp    () const -> VertexIndices {
	return m_edges.vertices(m_index);
}
auto Edge::normalImp      () const -> NormalVector {
	return m_edges.normal(m_index);
}
auto Edge::midpointImp    () const -> Vector2s {
	return m_edges.midpoint(m_index);
}
auto Edge::intersectionImp() const -> Vector2s {
	return m_edges.intersection(m_index);
}
auto Edge::isBoundaryImp  () const -> bool {
	return m_edges.isBoundary(m_index);
}

auto Edge::cellsImp(Index) const -> CellIndices {
	return m_edges.cells_s(m_index);
}
auto Edge::domainCellImp(Index) const -> Index {
	return m_edges.domainCell(m_index);
}
auto Edge::ghostCellImp (Index) const -> Index {
	return m_edges.ghostCell(m_index);
}

}